package net.hn.hnms.biz.safety.location.controller.feign;

import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.api.safety.monitor.model.BaseSensorCoordDto;
import net.hn.hnms.biz.safety.location.service.LocationService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

//@ApiIgnore
@RestController
@RequestMapping("/remoteJxry")
@Validated
public class RemoteJxryController {
    @Resource
    private LocationService locationService;

    /**
     * 获取井下人员BaseSensorTable表所有信息
     */
    @GetMapping("getBaseSensorTableAllList")
    public List<BaseSensorCoordDto> getBaseSensorTableAllList(String mineCode, String companyCode){
        List<BaseSensorCoordDto> baseSensorInfoNowPoList= locationService.getBaseSensorTableAllList(mineCode);
        return baseSensorInfoNowPoList;
    }

    /**
     * 获取井下总人数
     * @param mineCode
     * @return
     */
    @GetMapping("getPitNumber")
    @ApiOperation("获取井下总人数")
    public String getPitNumber(String mineCode) {
        //获取井下总人数
        Integer number = locationService.getPitNumber(mineCode);
        return number.toString();
    }
}